﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace InsertFromSkyDrive
{
    public partial class frmOptions : Form
    {
        PluginSettings m_settings;

        public frmOptions(PluginSettings settings)
        {
            m_settings = settings;
            InitializeComponent();
            windowsLiveID1.FirstRun(settings, true, null);
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if (windowsLiveID1.user == string.Empty)
            {
                MessageBox.Show("Sorry, you never signed in, nothing to save.", "Doh", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            m_settings.AutoSignIn = windowsLiveID1.auto;
            m_settings.User = windowsLiveID1.user;
            m_settings.CId = windowsLiveID1.cid;
            this.Close();
        }
    }
}
